Crate bevy_math[][src]

Modules

bool

bool vector mask types.

f32

f32 vector, quaternion and matrix types.

f64

f64 vector, quaternion and matrix types.

i32

i32 vector types.

prelude
swizzles

Traits adding swizzle methods to all vector types.

u32

u32 vector types.

Macros

const_dmat2

Creates a DMat2 from two column vectors that can be used to initialize a constant value.

const_dmat3

Creates a DMat3 from three column vectors that can be used to initialize a constant value.

const_dmat4

Creates a DMat4 from four column vectors that can be used to initialize a constant value.

const_dquat

Creates a DQuat from x, y, z and w values that can be used to initialize a constant value.

const_dvec2

Creates a DVec2 that can be used to initialize a constant value.

const_dvec3

Creates a DVec3 that can be used to initialize a constant value.

const_dvec4

Creates a DVec4 that can be used to initialize a constant value.

const_ivec2

Creates a IVec2 that can be used to initialize a constant value.

const_ivec3

Creates a IVec3 that can be used to initialize a constant value.

const_ivec4

Creates a IVec4 that can be used to initialize a constant value.

const_m128
const_mat2

Creates a Mat2 from two column vectors that can be used to initialize a constant value.

const_mat3

Creates a Mat3 from three column vectors that can be used to initialize a constant value.

const_mat4

Creates a Mat4 from four column vectors that can be used to initialize a constant value.

const_quat

Creates a Quat from x, y, z and w values that can be used to initialize a constant value.

const_uvec2

Creates a UVec2 that can be used to initialize a constant value.

const_uvec3

Creates a UVec3 that can be used to initialize a constant value.

const_uvec4

Creates a UVec4 that can be used to initialize a constant value.

const_vec2

Creates a Vec2 that can be used to initialize a constant value.

const_vec3

Creates a Vec3 that can be used to initialize a constant value.

const_vec3a

Creates a Vec3A that can be used to initialize a constant value.

const_vec4

Creates a Vec4 that can be used to initialize a constant value.

Structs

BVec2

A 2-dimensional boolean vector.

BVec3

A 3-dimensional boolean vector.

BVec3A

A 3-dimensional SIMD vector mask.

BVec4

A 4-dimensional boolean vector.

BVec4A

A 4-dimensional SIMD vector mask.

DMat2

A 2x2 column major matrix.

DMat3

A 3x3 column major matrix.

DMat4

A 4x4 column major matrix.

DQuat

A quaternion representing an orientation.

DVec2

A 2-dimensional vector.

DVec3

A 3-dimensional vector.

DVec4

A 4-dimensional vector.

IVec2

A 2-dimensional vector.

IVec3

A 3-dimensional vector.

IVec4

A 4-dimensional vector.

Mat2

A 2x2 column major matrix.

Mat3

A 3x3 column major matrix.

Mat4

A 4x4 column major matrix.

Quat

A quaternion representing an orientation.

Rect

A rect, as defined by its “side” locations

Size

A two dimensional “size” as defined by a width and height

UVec2

A 2-dimensional vector.

UVec3

A 3-dimensional vector.

UVec4

A 4-dimensional vector.

Vec2

A 2-dimensional vector.

Vec3

A 3-dimensional vector without SIMD support.

Vec3A

A 3-dimensional vector with SIMD support.

Vec4

A 4-dimensional vector.

XY
XYZ
XYZW

Traits

FaceToward

Generates a translation / rotation matrix that faces a given target

Vec2Swizzles

Swizzle methods for 2-dimensional vector types.

Vec3Swizzles

Swizzle methods for 3-dimensional vector types.

Vec4Swizzles

Swizzle methods for 3-dimensional vector types.

Functions

dmat2

Creates a 2x2 matrix from two column vectors.

dmat3

Creates a 3x3 matrix from three column vectors.

dmat4

Creates a 4x4 matrix from four column vectors.

dquat

Creates a quaternion from x, y, z and w values.

dvec2

Creates a 2-dimensional vector.

dvec3

Creates a 3-dimensional vector.

dvec4

Creates a 4-dimensional vector.

ivec2

Creates a 2-dimensional vector.

ivec3

Creates a 3-dimensional vector.

ivec4

Creates a 4-dimensional vector.

mat2

Creates a 2x2 matrix from two column vectors.

mat3

Creates a 3x3 matrix from three column vectors.

mat4

Creates a 4x4 matrix from four column vectors.

quat

Creates a quaternion from x, y, z and w values.

uvec2

Creates a 2-dimensional vector.

uvec3

Creates a 3-dimensional vector.

uvec4

Creates a 4-dimensional vector.

vec2

Creates a 2-dimensional vector.

vec3

Creates a 3-dimensional vector.

vec3a

Creates a 3-dimensional vector.

vec4

Creates a 4-dimensional vector.